<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registration Form</title>
<script language="javascript">
		var xmlHttp;
		function checkUserExist() {
			var ebay_id = document.getElementById("ebay_id").value;
			var url = "checkuser?ebay_id=" + ebay_id;
			if(window.XMLHttpRequest){
				xmlHttp = new XMLHttpRequest();
			}
			else if(window.ActiveXObject){
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}

			xmlHttp.open("Get",url,true);
			xmlHttp.onreadystatechange = callback;
			xmlHttp.send(null);
		}
		
		function callback() {
			if( xmlHttp.readyState==4 ){
				if( xmlHttp.status==200 ) {
					document.getElementById('text').innerHTML = "<br/><b>"+xmlHttp.responseText+"</b>";
				}
			}
		}
		
		function focusIn(){
			document.getElementById("username").focus( );
		}  	
  	</script>

</head>
<body>
	<form method="post" action="register1">
		ERROR PAGE:
		<table width="100%">
			<tr>
				<td width="60%"><img src="ebay-logo.jpg" width="10%"
					height="10%">
				<td><img src="ebaysecurity1.png" width="5%" height="10%" />Ebay
					Buyer Protection &nbsp;&nbsp;&nbsp;<a href="">Learn more</a>
			</tr>
		</table>
		<hr color="red" width="100%">

		<h2>Register With E-bay</h2>
		<hr width="100%">
		<br> Tell us about yourself(All fields are required)
		<hr width="100%">
		<table>
			<tr>
				<td>First Name:
				<td><input type="text" name="fname" />
			<tr>
				<td>Last Name:
				<td><input type="text" name="lname" />
			<tr>
				<td>Street Address:
				<td><input type="text" name="streetaddress" />
			<tr>
				<td>Zip:
				<td><input type="text" name="zip" />
			<tr>
				<td>City:
				<td><input type="text" name="city" />
			<tr>
				<td>State:
				<td><input type="text" name="state" />
			<tr>
				<td>Country:
				<td><input type="text" name="country" />
			<tr>
				<td>Email-id
				<td><input type="text" name="email" /><br>
			<tr>
				<td>Re-enter your email-id
				<td><input type="text" name="reemail" /><br>
			<tr>
				<td>Your Phone no
				<td><input type="text" name="phone_no" /><br>
			<tr>
				<td>
		</table>

		<h2>Create your ebay id and password</h2>
		<br>
		<table>

			<tr>
				<td><div id="result">
						Create your ebay-id:
						<td><input type="text" name="ebay_id" />
						<td><input type="submit" value="Check Availability">
					</div>
			<tr>
				<td colspan="2">Create your password:
				<td><input type="password" name="password" />
			<tr>
				<td colspan="2">Re-enter your password:
				<td><input type="password" name="repassword" />
			<tr>
				<td colspan="2">Select your secret question:
				<td><input type="text" name="secret_question" />
			<tr>
				<td colspan="2">Enter your secret question
				<td><input type="text" name="ursecret_question" />
			<tr>
				<td colspan="2">Date of birth:</td>
				<td colspan="2"><input type="text" name="dob" />
		</table>
		<center>
			<input type="submit" value="REGISTER" name="register1"
				onclick="makerequest(document.getElementById('ebay_id').value,'result')" />
		</center>
	</form>
</body>

</html>